puzzlepiece: Use new snapshot transforms
authorBenjamin Otte <otte@redhat.com>
Thu, 21 Feb 2019 04:34:12 +0000 (05:34 +0100)
committerBenjamin Otte <otte@redhat.com>
Thu, 21 Feb 2019 18:47:28 +0000 (19:47 +0100)
demos/gtk-demo/puzzlepiece.c

index cb8a81b9b9c1858d14059a21a989b83478a47331..23bdf21a659204f1879d4236ef8b0742a5749113 100644 (file)
@@ -47,9 +47,11 @@ gtk_puzzle_piece_snapshot (GdkPaintable *paintable,
   gtk_snapshot_push_clip (snapshot,
                           &GRAPHENE_RECT_INIT (0, 0, width, height));
 
-  gtk_snapshot_offset (snapshot,
-                       - width * self->x,
-                       - height * self->y);
+  gtk_snapshot_translate (snapshot,
+                          &GRAPHENE_POINT_INIT (
+                              - width * self->x,
+                              - height * self->y
+                          ));
   gdk_paintable_snapshot (self->puzzle,
                           snapshot,
                           width * self->width,